import React, { Component } from 'react';
import pic11 from '../assets/11.gif'
import pic from '../assets/13.jpg'


import "../styles/MySecKill.scss";


class MySecKill extends Component {
    constructor(props) {
        super(props);
        this.state = { //state中保存的值就是组件的状态
            list: [
                { pic, text: '护肤', price: '￥303', money: '￥195' },
                { pic, text: '护肤', price: '￥303', money: '￥675' },
                { pic, text: '护肤', price: '￥303', money: '￥2543' },
                { pic, text: '护肤', price: '￥303', money: '￥413' },
                { pic, text: '护肤', price: '￥303', money: '￥93' },
                { pic, text: '护肤', price: '￥303', money: '￥1487' },
                { pic, text: '护肤', price: '￥303', money: '￥195' },
                { pic, text: '护肤', price: '￥303', money: '￥666' },
                { pic, text: '护肤', price: '￥303', money: '￥898' },

            ]
        }
    }
    render() {
        return (
            <div className='SecKill'>
                <div className="pic">
                    <img src={pic11} alt="" />
                </div>
                <div className="one">
                    {this.state.list.map((item, index) => {
                        return (
                            <div className="item" key={index}>
                                <img src={item.pic} alt="" />
                                <div className="text">{item.text}</div>
                                <div className="price">{item.price}</div>
                                <div className="money">{item.money}</div>
                            </div>
                        )
                    })
                    }
                </div>

            </div>
        );
    }
}

export default MySecKill;